package com.jt.Service;

import com.jt.Dao.UserDao;
import com.jt.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userServiceA")
public class UserServiceImpl implements UserService{
    @Autowired//根据类型注入
//    @Autowired（“aaa”）//必须按照名称进行匹配 一般不写
    private UserDao userDao;
    @Override
    public void addUser(User user) {
        System.out.println("我是Service");
        userDao.addUser(user);
        System.out.println(user);
    }
}
